<%--
  Created by IntelliJ IDEA.
  User: 14811
  Date: 2022-4-15
  Time: 14:33
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
    <script>
        var setting = {
            data: {
                simpleData: {
                    enable: true
                }
            },
            check: {
                enable: true,
                autoCheckTrigger: true
            },
            async: {
                enable: true,
                url: "<%=request.getContextPath()%>/menuController/getzTree",
                autoParam: ["id", "name"]
            }
        }

        $(document).ready(function(){
            $.fn.zTree.init($("#treeDemo"), setting);
        });
    </script>
</head>
<body>
    <form class="form-horizontal" role="form" id="addRole">
        <div class="form-group">
            <label for="roleName" class="col-sm-2 control-label">角色名称</label>
            <div class="col-sm-4">
                <input type="text" class="form-control" id="roleName" name="roleName" placeholder="请输入名称">
            </div>
        </div>
        <div class="form-group">
            <label for="roleName" class="col-sm-2 control-label">权限</label>
            <div class="col-sm-4">
                <div class="zTreeDemoBackground left">
                    <ul id="treeDemo" class="ztree"></ul>
                </div>
            </div>
        </div>

    </form>
</body>
</html>
